/*vue 全局组件*/

//帖子查看组件
Vue.component("topic-view",{
	prop: ['topicV','topicData'],
	template: "<el-dialog class='p10' v-model='topicData' :visible.sync='topicV' :close-on-click-modal=false @close='close'>" +
				"<div style='border: 1px solid #dfe4ed;border-radius: 4px;padding: 10px;'>" +
					"<h2>{{topicData.tname}}</h2>"+
					"<div class='flex wBetween mt10'>"+
						"<div>"+"<span>发布人: {{topicData.userName}}</span>"+"</div>"+
						"<div>"+"<span>所属板块: {{topicData.pname}}</span>"+"</div>"+
						"<div>"+"<span>发布时间: {{topicData.createDate}}</span>"+"</div>"+
					"</div>"+
					"<div>{{topicData.tcontent}}</div>"+
				"</div>"+
			  "</el-dialog>",
	data: function(){
		return{
			topicV:false,
			topicData:{}
		}
	},
	methods: {
		close:function(){
			this.$meit('change','');
		}
	}
})